Laravel eloquent upserts

39

Laravel eloquent upserts -

$flight = Flight::updateOrCreate(
    ['departure' => 'Oakland', 'destination' => 'San Diego'],
    ['price' => 99, 'discounted' => 1]
);

Comments

Submit
0 Comments